#include "ModifEtu.h"

//(*InternalHeaders(ModifEtu)
#include <wx/intl.h>
#include <wx/string.h>
//*)

//(*IdInit(ModifEtu)
const long ModifEtu::ID_TEXTCTRL1 = wxNewId();
const long ModifEtu::ID_BUTTON1 = wxNewId();
const long ModifEtu::ID_BUTTON2 = wxNewId();
const long ModifEtu::ID_PANEL1 = wxNewId();
//*)

BEGIN_EVENT_TABLE(ModifEtu,wxFrame)
	//(*EventTable(ModifEtu)
	//*)
END_EVENT_TABLE()

ModifEtu::ModifEtu(wxWindow* parent,wxWindowID id)
{
	//(*Initialize(ModifEtu)
	Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
	Panel1 = new wxPanel(this, ID_PANEL1, wxPoint(152,192), wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL1"));
	TextCtrl1 = new wxTextCtrl(Panel1, ID_TEXTCTRL1, _("Nom"), wxPoint(64,16), wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
	Button1 = new wxButton(Panel1, ID_BUTTON1, _("Recherche"), wxPoint(256,24), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
	Button2 = new wxButton(Panel1, ID_BUTTON2, _("Afficher liste"), wxPoint(280,120), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));

//	Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&ModifEtu::OnButton1Click);
	Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&ModifEtu::OnButton2Click);
	//*)
}

ModifEtu::~ModifEtu()
{
	//(*Destroy(ModifEtu)
	//*)
}


void ModifEtu::OnButton2Click(wxCommandEvent& event)
{
    vector<Student>::iterator it;
    extern vector<Student> BD;
    string nom;
    int pos=0;
//    for (it=BD.begin(); it!=BD.end(); ++it)
//        {
//            nom=it->GetFirstName();
//            ListCtrl1->InsertItem(pos,s2ws(nom));
//            pos++;
//        }
}
